<extend name="Public/base"/>

<block name="style">
<link href="__CSS__/jtbk.css" rel="stylesheet" type="text/css"/>
</block>
<block name="content">   
    <ul class="nav nav-tabs">
    <li ><a href="{:U('Index/index')}"><i class="glyphicon glyphicon-home"></i>首页</a></li>
   <li class="active"><a href="{:U('Index/add')}">资料上传</a></li>
   <li><a href="{:U('Index/search')}">资料搜索</a></li>
   <!-- <li><a href="{:U('Beike/addsubject')}">课程管理</a></li> -->
   <li><a href="{:U('Index/myupload','id='.$vo['id'])}" >我的上传情况</a><li>
   </ul>
	<!-- 标题栏 -->
       <h4 style="color:#5A81A8"><i class="glyphicon glyphicon-pencil">step2</i> 集体备课资料上传</h4>
      
<div class="col-xs-9">
   <!-- 面板1start  -->
 <div class=" panel panel-info">
   <div class="panel-heading">
      <h3 class="panel-title">课程信息 <button type="button" class="panel-collapse close" href="#post-info" data-toggle="collapse"><span class="pull-right glyphicon glyphicon-chevron-up"></span></button></h3>     
   </div>
   <div  id="post-info" class="collapse in">
       <div class="panel-body">
       <table class="table table-bordered">
       <tr>
       <td> <b>任教学科：</b>{$info.subject} </td>
       <td> <b> 任教年级：</b>{$info.grade} </td>
        </tr>
        <tr>
        <td><b>课文标题：</b>{$info.title}({$info.jx_time})</td>
        <td><b> 任课教师：</b> {$info.teacher} </td>
        </tr>
        <tr>
        <td><b>创建日期：</b>  {$info.create_time|date="Y-m-d",###}  </td>
         <td><b>上传文件数：</b><eq name="info.files" value="0">暂无上传<else/>{$info.files}</eq> </td>
         </tr>
          </table>
          <div>请检查登记的备课信息! <a class="pull-right" href="{:U('Index/edit',array('id'=>$info['id']))}"><span class="glyphicon glyphicon-edit"></span>保存</a></div>
        </div>
          <div class="panel-footer"><span class=" glyphicon glyphicon-hand-down">  </span>  请在下面选择相应类别，并添加要上传的文件（上传前请按课题名称命名文件）</div>
       </div>
    </div>
    <!-- 面板1end  -->
  </div>
  <div class="clearfix" > </div>
 <!--面板2start --> 
 <div class="col-sm-9 ">
  <div class="panel panel-info">
   <div class="panel-heading">
      <h3 class="panel-title">上传文档
       <span class="pull-right">已上传文件：
       <if condition="!$postfiles">【暂无】</if>
        <foreach name="postfiles" item="vo">
        【<a href="{$vo.id}{$vo.title}">{$vo.cate}</a>】
       </foreach>
      </span></h3>
   </div>

   <div class="panel-body">
    <div class="form-horizontal">
        <form method='post' id="form" name="form"  enctype="multipart/form-data" action="" role="form" >  
               <label class="col-sm-1 control-label no-padding-right" for="cate">类别</label>
               <div class="col-sm-3"><select name="cate" id="cate" class="form-control" >
                <option value="" > 请选择类别</option>
                <option value="教案" > 教案及反思</option>
                <option value="课件" > 课件</option>                
                <option value="拓展资料" >拓展资料</option>
                </select>               
                </div>

            <div class="controls">
               <input id="lefile" class="form-control" type="file" name="upfile" style="display:none">
              <div class="input-append">
              <input id="photoCover" class="input-large" type="text" style="height:30px; width:300px;">
                <a class="btn btn-primary" onclick="$('input[id=lefile]').click();"><i class="glyphicon glyphicon-folder-open"> </i>    浏览文件</a>
              </div>
                <label class="help-block">集体备课附件：
                      <span class="check-tips">（请以附件形式上传集体备课电子文档）</span> </label>
            </div>
   <script type="text/javascript">
    $('input[id=lefile]').change(function() {
    $('#photoCover').val($(this).val());
    });
    </script>
          <div class="col-md-4">
          </div>
        </div>
        <div class="form-group">
        <input  type="hidden" name="postid" value="{$info.id}" />
        <input  type="hidden" name="grade" value="{$info.grade}" />
        <input  type="hidden" name="savepath" value="{$info.savepath}" />
        <input  type="hidden" name="teacher" value="{$info.teacher}" />
        </div>


      <div class="form-actions" style="margin-bottom:20px;height:30px;">
      <div class="col-md-offset-1 col-md-2"> 
        <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span>  保存</button>
        </div>
        <div class="col-md-1">
        <button type="button" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span>  取消</button> 
         </div>
        </div>
      </form> 
   </div>
   
   </div>
</div>
<!--面板2end-->
 </div> 
</block>

